//
//  ShoppingViewController.m
//  LiTingFeng
//
//  Created by xinxuan on 16/3/21.
//  Copyright © 2016年 Bullgo. All rights reserved.
//

#import "ShoppingViewController.h"

#define kURL @""

@interface ShoppingViewController ()
@property (nonatomic,strong) UIWebView * webView;
@end

@implementation ShoppingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, Screen_Width , Screen_Height)];
    //webView的透明度
    self.webView.backgroundColor = [UIColor whiteColor];
    self.webView.scrollView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.webView];
    //开辟子线程加载页面
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        [self loadDocument:kURL inView:self.webView];
        dispatch_async(dispatch_get_main_queue(), ^{
            
        });
        [self.view reloadInputViews];
    });
    
    
}




-(void)loadDocument:(NSString *)documentName inView:(UIWebView *)webView
{
    NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:nil];
    NSURL *url = [NSURL fileURLWithPath:path];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [webView loadRequest:request];
}

@end
